import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import Home from '../views/Home.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path:'/',
    redirect: '/login'
  },
  {
    path:'/login',
    name:'Login',
    component:() =>import('../views/Login.vue')
  },
  {
    path:'/setting',
    name:'setting',
    component:() =>import('../views/Setting.vue')
  },
  {
    path:'/home',
    name:'Home',
    component:() =>import('../views/Home.vue')
  },
  {
    path:'/chess',
    name:'Chess',
    component:() =>import('../views/Chess.vue')
  },
  {
    path:'/test',
    name:'Test',
    component:() =>import('../views/Test.vue')
  },

  {
    path:'/vue-demo',
    name:'VueDemo',
    component:() =>import('../views/VueDemo.vue')
  },

  // {
  //   path:'/Home',
  //   name:'Home',
  //   component: Home,
  //   children:[
  //     {
  //       path:'/homePage',
  //       name:'homePage',
  //       component:() =>import('../views/homePage.vue')
  //     },
  //     {
  //       path:'/DocManage',
  //       name:'DocManage',
  //       component:() =>import('../views/DocManage.vue')
  //     },
  //     {
  //       path:'/ReleaseRecords',
  //       name:'ReleaseRecords',
  //       component:() =>import('../views/ReleaseRecords.vue')
  //     },
  //   ]
  // },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
